<HTML><HEAD><TITLE>domain(?SetVariable, -Domain)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>domain(?SetVariable, -Domain)</H1>
Accessing the domain of a set
<DL>
<DT><EM>SetVariable</EM></DT>
<DD>A set variable.
</DD>
<DT><EM>Domain</EM></DT>
<DD>A list (pair) with glb and poss.
</DD>
</DL>
<H2>Description</H2>
Domain is unified with the domain of SetVariable in the form [Glb:NIn,Poss:NMax],
		where Glb is the (greatest) lower bound of SetVariable, and NIn its length,
		Poss is the set of still possible elements of SetVariable (i.e. its lub\glb),
		and NMax is the lub's cardinality (i.e. NIn + #(Poss)).<P>
		If SetVariable is a set of sets and a union function attribute has been set,
		then each element of Poss comes annotated with its respective length.
<H3>Fail Conditions</H3>
Fails if Domain can not be unified with the current domain of SetVariable.
<H3>Resatisfiable</H3>
No.
<H2>Examples</H2>
<PRE>
?- S `::[c]+[a,b], domain(S,D).
D = [[c]:1, [a,b]:3]

?- set(S, [],[[a,b],[b,c],[a,c],[b]],[union:[a,b,c]]), domain(S,D).
D = [[]:0, [[a,b]:2, [a,c]:2, [b]:1, [b,c]:2]:4]
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/domain-3.html">domain / 3</A>, <A HREF="../../lib_public/cardinal/glb-2.html">glb / 2</A>, <A HREF="../../lib_public/cardinal/poss-2.html">poss / 2</A>, <A HREF="../../lib_public/cardinal/glb_poss-3.html">glb_poss / 3</A>, <A HREF="../../lib_public/cardinal/lub-2.html">lub / 2</A>, <A HREF="../../lib_public/cardinal/lub-4.html">lub / 4</A>
</BODY></HTML>
